package cn.wsalix.constant;

import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;

import org.springframework.context.ApplicationContext;

import cn.anlaser.exception.NutException;
import cn.wsalix.admin.entity.SysDict;
import cn.wsalix.config.AppConfig;
import cn.wsalix.config.SysConfig;

public class Global {
	public static final String HOST_PATH = "http://%s:%s/%s";
	public static final String hello = "hello jskyme";
	public static final int pageSize = 20;
	public static ApplicationContext springContext;
	public static SysDict parentException;
	public static Map<String, NutException> excepInsts;
	public static String urlSuffix;
	public static AppConfig appConfig;
	public static SysConfig sysConfig;
	public static String uploadDir;
	public static String uploadHttp;
	//public static FileServerConfig fsConfig;
	public static String SORT_SER_NO = "serNo";
/*	public static String siteTempletPath;
	public static String templetPath;*/
	
	public static String qqAppId;
	public static String qqAppKey;
	public static String qqServerName;
	
	public static String wxAppId;
	public static String wxMchId;
	public static String wxTradeType;
	public static String wxNotifyUrl;
	public static String wxPayKey;
	public static AtomicInteger wxUserCount;  
	
	public static NutException getException(String message) {
		return new NutException(message);
	}

	public static Object getBean(String beanName) {
		return springContext.getBean(beanName);
	}

	public static void setSpringContext(ApplicationContext applicationContext) {
		springContext = applicationContext;
	}
}
